<?
/**************************************************************************************************
| Software Name        : OPENTUBE - Open Source (flex based) Video Sharing Application
| Software Version     : 0.1
| Website              : http://opentube.info
| Blog                 : http://blog.opentube.info
| E-mail               : opentube@googlegroups.com
|
|**************************************************************************************************
| This source file is subject to the LGPL License Agreement, available online at:
| http://www.gnu.org/copyleft/lesser.html
| By using this software, you acknowledge having read this Agreement and agree to be bound thereby.
|
|**************************************************************************************************/
session_start();
$config = array();

$config['BASE_DIR']     =  '/FULL/PATH/TO/WEBSERVER/ROOT';


$url = "http://opentube.info/xml";
$domain = "opentube.info";


$config['BASE_URL']     =  $url;

$config['IMG_DIR']      =  $config[BASE_DIR].'/images';
$config['IMG_URL']      =  $config[BASE_URL].'/images';
$config['TMB_DIR']      =  $config[BASE_DIR].'/thumb';
$config['TMB_URL']      =  $config[BASE_URL].'/thumb';
$config['baseurl']      =  $config['BASE_URL'];
$config['basedir']      =  $config['BASE_DIR'];

require_once('smarty/libs/Smarty.class.php');
require_once($config[BASE_DIR].'/classes/mysmarty.class.php');
require_once($config[BASE_DIR].'/classes/SConfig.php');
require_once($config[BASE_DIR].'/classes/SError.php');
require_once('adodb/adodb.inc.php');
require_once($config[BASE_DIR].'/include/dbconfig.php');

$conn = &ADONewConnection($DBTYPE);
$conn->PConnect($DBHOST, $DBUSER, $DBPASSWORD, $DBNAME);

$sql = "SELECT * from sconfig";
$rsc = $conn->Execute($sql);

if($rsc){while(!$rsc->EOF)
{
$field = $rsc->fields['soption'];
$config[$field] = $rsc->fields['svalue'];
STemplate::assign($field, $config[$field]);
@$rsc->MoveNext();
}}

STemplate::assign('BASE_URL', $config['BASE_URL']);
STemplate::assign('BASE_DIR', $config['BASE_DIR']);
STemplate::assign('IMG_URL', $config['IMG_URL']);
STemplate::assign('baseurl', $config['BASE_URL']);
STemplate::assign('basedir', $config['BASE_DIR']);
STemplate::assign('imgurl', $config['IMG_URL']);
STemplate::assign('tmburl', $config['TMB_URL']);
STemplate::setCompileDir($config['basedir']."/templates_c");
STemplate::setTplDir($config['basedir']."/templates");
?>
